package com.study;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.transaction.annotation.EnableTransactionManagement;


@EnableTransactionManagement//开启事务支持
@SpringBootApplication(scanBasePackages = "com.study")

// @ImportAutoConfiguration(exclude = DataSourceAutoConfiguration.class)
public class SpthymeleafApplication {
    /**
     * 日志使用
     */
    private static final Logger logger = LoggerFactory.getLogger(SpthymeleafApplication.class);

    public static void main(String[] args) {
        //Ctrl +c 先关闭 ffmpeg进程
        Runtime.getRuntime().addShutdownHook(new Thread(
                () -> {
                    //CommandManagerUtils.stopAllffmpeg();
                    System.out.println("可以执行一些命令");
                }
        ));
        SpringApplication.run(SpthymeleafApplication.class, args);
        logger.info("系统启动");
    }

}
